<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>柱状图</title>
		<script src="https://cdn.bootcss.com/echarts/4.2.0-rc.2/echarts-en.common.min.js"></script>
	</head>
	<body>
		<div id="main" style="width: 500px;height: 400px;"></div>
		<script type="text/javascript">
			var myCharts = echarts.init(document.getElementById("main"));
			var option = {
				title:{
					text:"2017年某某统计",
					subtext:"本数据纯属虚构"
				},
				tooltip:{},
				legend:{
					data:['销量']
				},
				xAxis:{
					data:["衬衫","羊毛衫","裤子"]
				},
				yAxis:{},
				series:[{
					name:"销量",
					type:"bar",
					data:[2,5,12]
				}]
			}
			myCharts.setOption(option);
		</script>
	</body>
</html>
